package com.xiaoxin.yixinai.activity;

import java.util.List;

import javax.annotation.Resource;
import javax.persistence.EntityManager;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xiaoxin.yixinai._frame.base.BaseRepository;
import com.xiaoxin.yixinai._frame.base.BaseServiceProxy;

@Service
@Transactional
public class ActivityService extends BaseServiceProxy<Activity> {
	
	@Resource
    private EntityManager em;
	
	@Resource
	private ActivityRepository activityRepository;

	@Override
	protected BaseRepository<Activity> getBaseRepository() {
		return activityRepository;
	}
	
	/**
	 * 查询所有活动
	 */
	public List<Activity> findByCompanyId(Integer companyId) {
		return activityRepository.findByCompanyId(companyId);
	}
	
	
}
